const Home = () => import('@/views/root/index') // 主页
const login = () => import('@/views/root/login') // 登录
const notFound = () => import('@/views/root/404') // 404
const index = () => import('@/views/home/index') // Home
const register = () => import('@/views/root/register') // 注册
const forgetPassword = () => import('@/views/root/forgetPassword') // 忘记密码
const forum = () => import('@/views/root/forum') // 论坛
const forumDetail = () => import('@/views/root/forumDetail/index') // 论坛


const root = [
  {
    path: '*',
    name: 'notFound',
    component: notFound
  },
  {
    path: '/login',
    component: login,
    meta: { title: '登录' }
  },
  {
    path: '/register',
    component: register,
    meta: { title: '注册' }
  },
  {
    path: '/forgetPassword',
    component: forgetPassword,
    meta: { title: '忘记密码' }
  },
  {
    path: '/forum',
    component: forum,
    meta: { title: '论坛' }
  },
  {
    path: '/forumDetail',
    component: forumDetail,
    meta: { title: '论坛文章' }
  },
  {
    path: '/',
    component: Home,
    children: [
      {
        path: '/',
        // redirect: '/login', // 设置默认指向的路径
        component: index,
        meta: { title: '数字经济图书馆', type: 99 }
      }
    ]
  }]

export default root
